.PHONY: clean

build/%.rel: %.c
	sdcc -c $< -o $@

build/main.hex: build/main.ihx
	packihx build\main.ihx > build\main.hex

# build/main.ihx: build/timer.rel build/uart.rel build/lcd.rel build/main.rel
# 	sdcc build\timer.rel build\uart.rel build\lcd.rel build\main.rel -o build\main.ihx

build/main.ihx: build/lcd.rel build/main.rel
	sdcc build\lcd.rel build\main.rel -o build\main.ihx

clean:
	del /Q build\timer.* build\uart.* build\lcd.* build\main.*
